home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:variable name="ScoreLookup">
- <c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
- <c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
- <c score="2" url="Graphics/x_red.gif" alttext="Check failed (critical)"/>
- <c score="3" url="Graphics/x_gold.gif" alttext="Check failed (non-critical)"/>
- <c score="4" url="Graphics/astrx.gif" alttext="Best practice"/>
- <c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
- <c score="6" url="Graphics/dash.gif" alttext="Check not performed"/>
- <c score="7" url="Graphics/info.gif" alttext="Additional information"/>
-
- </xsl:variable>
-
- <xsl:variable name="Assessment">
- <c score="1" text="Unable to Scan" longtext="Could not complete one or more requested checks."/>
- <c score="2" text="Severe Risk" longtext="One or more critical checks failed."/>
- <c score="3" text="Potential Risk" longtext="One or more non-critical checks failed."/>
- <c score="4" text="Security FYIs" longtext=""/>
- <c score="5" text="Strong Security" longtext="All checks were passed."/>
- </xsl:variable>
-
- <xsl:variable name="FileName" select="'file name here'"></xsl:variable>
-
- <xsl:template match="SecScan">
- <xsl:param name="assess" select="@Grade"/>
- <table>
- <tr>
- <td class="reportsubheader" width="140">Computer name:</td>
- <td><xsl:value-of select="@Domain"/>\<xsl:value-of select="@Machine"/></td>
- </tr>
- <tr>
- <td class="reportsubheader" width="140">IP address:</td>
- <td><xsl:value-of select="@IP"/></td>
- </tr>
- <tr>
- <td class="reportsubheader" width="140">Security report name:</td>
- <td><xsl:value-of select="$FileName" /></td>
- </tr>
- <tr>
- <td class="reportsubheader" width="140">Scan date:</td>
- <xsl:choose>
- <xsl:when test="@LDate">
- <td><xsl:value-of select="@LDate"/></td>
- </xsl:when>
- <xsl:otherwise>
- <td><xsl:value-of select="@Date"/></td>
- </xsl:otherwise>
- </xsl:choose>
- </tr>
- <xsl:choose>
- <xsl:when test="@HotfixDataVersion">
- <tr>
- <td class="reportsubheader" width="140">Hotfix database version:</td>
- <td><xsl:value-of select="@HotfixDataVersion"/></td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <tr>
- <td class="reportsubheader" width="140">Security assessment:</td>
- <td><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$assess]/@text"/><xsl:text> </xsl:text>(<xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$assess]/@longtext"/>)</td>
- </tr>
-
- <xsl:choose>
- <xsl:when test="Check[@ID='125']">
- <tr>
- <td colspan="2" class="reportsubheader">
- <br />
- This computer is running Windows .NET Server. This version of Windows is not officially supported in this release.
- <br />
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- </table>
-
- <xsl:choose>
- <xsl:when test="Check[@Type='1']">
- <br />
- <div class="reportheader">Windows Scan Results</div>
- <xsl:choose>
- <xsl:when test="Check[@Type='1'][@Cat='1']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='1'][@Cat='1']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='1'][@Cat='2']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='1'][@Cat='2']">
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="Check[@Type='3']">
- <br />
- <div class="reportheader">Internet Information Services (IIS) Scan Results</div>
- <xsl:choose>
- <xsl:when test="Check[@Type='3'][@Cat='1']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='3'][@Cat='1']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='3'][@Cat='2']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='3'][@Cat='2']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='3'][@Cat='4']">
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='3'][@Cat='4']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="Check[@Type='2']">
- <br />
- <div class="reportheader">SQL Server Scan Results</div>
- <xsl:choose>
- <xsl:when test="Check[@Type='2'][@Cat='1']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='2'][@Cat='1']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='2'][@Cat='2']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='2'][@Cat='2']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='2'][@Cat='4']">
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='2'][@Cat='4']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="Check[@Type='4']">
- <br />
- <div class="reportheader">Desktop Application Scan Results</div>
- <xsl:choose>
- <xsl:when test="Check[@Type='4'][@Cat='1']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='4'][@Cat='1']">
- <xsl:sort order="sortorder" select="sortfield"/>
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='4'][@Cat='2']">
- <br />
- <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
- <br />
- <table width="100%" border="0" cellpadding="4" cellspacing="0">
- <tr class="ReportListHeader">
- <td class="ReportListHeader" style="WIDTH:60" align="center" valign="middle">Score</td>
- <td class="ReportListHeader" style="WIDTH:40" align="left">Issue</td>
- <td class="ReportListHeader">Result</td>
- </tr>
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='4'][@Cat='2']">
- <xsl:sort select="@Rank"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </table>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="Check">
- <xsl:param name="score" select="@Grade"/>
- <xsl:variable name="classname">
- <xsl:choose>
- <xsl:when test="(position() mod 2) = 1">ReportsRowOverEven</xsl:when>
- <xsl:otherwise>ReportsRowOverOdd</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <tr class="{$classname}">
- <td align="center" valign="middle">
- <xsl:choose>
- <xsl:when test="@Cat='2'">
- <xsl:choose>
- <xsl:when test="@ID='121'">
- <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
- </xsl:when>
- <xsl:when test="@ID='101'">
- <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
- </xsl:when>
- <xsl:otherwise>
- <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@url}" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td style="WIDTH:75"><xsl:value-of select="@Name"/></td>
- <td>
- <TABLE width="100%">
- <TR>
- <TD align="left" colspan="3"><xsl:value-of select="Advice"/></TD>
- </TR>
- <TR>
- <TD>
- <TABLE>
- <TR>
- <xsl:choose>
- <xsl:when test="$score=5">
- <xsl:choose>
- <xsl:when test="@URL1">
- <TD width="100" NoWrap="true"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" target="_new" href="{@URL1}">What was scanned</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD width="100" NoWrap="true"></TD>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Detail">
- <TD NoWrap="true" width="70"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" href="javascript:OpenDetails('{@ID}')">Result details</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD NoWrap="true" width="70"></TD>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="@URL2">
- <TD width="120" NoWrap="true"></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD width="120" NoWrap="true"></TD>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$score=4">
- <xsl:choose>
- <xsl:when test="@URL1">
- <TD width="100" NoWrap="true"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" target="_new" href="{@URL1}">What was scanned</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD width="100" NoWrap="true"></TD>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Detail">
- <TD NoWrap="true" width="70"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" href="javascript:OpenDetails('{@ID}')">Result details</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD NoWrap="true" width="70"></TD>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="@URL2">
- <TD width="120" NoWrap="true"></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD width="120" NoWrap="true"></TD>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="@URL1">
- <TD width="100" NoWrap="true"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" target="_new" href="{@URL1}">What was scanned</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD width="100" NoWrap="true"></TD>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Detail">
- <TD NoWrap="true" width="70"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" href="javascript:OpenDetails('{@ID}')">Result details</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD NoWrap="true" width="70"></TD>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="@URL2">
- <TD NoWrap="true" width="120"><A class="sys-link-normal" style="PADDING-LEFT: 1px;PADDING-BOTTOM:0px;PADDING-TOP: 0px;PADDING-RIGHT:0px" target="_new" href="{@URL2}">How to correct this</A></TD>
- </xsl:when>
- <xsl:otherwise>
- <TD width="120" NoWrap="true"></TD>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </td>
- </tr>
- </xsl:template>
- </xsl:stylesheet>